package org.sdau.rotten.library.dao;

import org.sdau.rotten.library.entity.Appointment;
import org.sdau.rotten.library.entity.Action;
import org.apache.ibatis.annotations.*;

import java.sql.Timestamp;
import java.util.List;

@Mapper
public interface AppointmentDAO {

	int insertAppointment(@Param("bookId") long bookId, @Param("studentId") long studentId);

	Appointment queryByKeyWithBook(@Param("bookId") long bookId, @Param("studentId") long studentId);

	List<Appointment> queryByStudentWithBook(@Param("studentId") long studentId);

	int insertAction(long bookId, long studentId, String operation);

	List<Action> allActions();

	List<Action> studentActions(String studentId);

	List<Action> bookActions(String bookId);

	int deleteAction(int id);

	int appointAgain(long bookId, long studentId, Timestamp timestamp);


}
